@use 'formio.embed.scss';
$dialog-z-index: 10000;
$autocomplete-in-dialog-z-index: $dialog-z-index + 1000;

.formio-form {
  position: relative;
}

.formio-error-wrapper,
.formio-warning-wrapper {
  padding: 1em;
}

.formio-error-wrapper {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;

  .formio-errors .error {
    color: #C20000;
  }

  .field-required:after {
    color:#C20000;
  }
}

.formio-warning-wrapper {
  color: #856404;
  background-color: #fff3cd;
  border-color: #ffeeba;
}

.form-control {
  height: calc(1.4em + 0.75rem + 2px);
}

.formio-disabled-input .form-control.flatpickr-input {
  background-color: #eee;
}

.builder-component.has-error .invalid-feedback,
.formio-component.has-error .invalid-feedback,
.formio-component.alert-danger .invalid-feedback,
.formio-component.has-message .invalid-feedback,
.formio-component-modal-wrapper.has-message .invalid-feedback,
.formio-component-modal-wrapper.has-error  .invalid-feedback  {
  display: block;
  color: inherit;
  margin-top: 4px;
}

.formio-errors {
  .error {
    color: #dc3545;
  }
  .warning {
    color: #856404;
  }
  .info {
    color: #004085;
  }
}

.formio-form-group {
  margin-bottom: 1rem;
}

.formio-wysiwyg-editor {
  min-height: 200px;
  background-color: #fff;
}

.has-feedback .form-control {
  padding-right: 10px;
}

.has-feedback .form-control[type=hidden] {
  padding-right: 0px;
}

.has-error.bg-danger {
  padding: 4px;
}

.ql-source:after {
  content: "[source]";
  white-space: nowrap;
}

.quill-source-code {
  width: 100%;
  margin: 0px;
  background: rgb(29, 29, 29);
  box-sizing: border-box;
  color: rgb(204, 204, 204);
  font-size: 15px;
  outline: none;
  padding: 20px;
  line-height: 24px;
  font-family: Consolas, Menlo, Monaco, "Courier New", monospace;
  position: absolute;
  top: 0;
  bottom: 0;
  border: none;
  display:none;
}

.formio-component-tags tags {
  background-color: #fff;
}

.field-required:after, .tab-error::after {
  content:" *";
  color:#EB0000;
}

.field-required:after {
  position: relative;
  z-index: 10;
}

.glyphicon-spin {
  -webkit-animation: formio-spin 1s infinite linear;
  -moz-animation: formio-spin 1s infinite linear;
  -o-animation: formio-spin 1s infinite linear;
  animation: formio-spin 1s infinite linear;
}

@-moz-keyframes formio-spin {
  from {
    -moz-transform: rotate(0deg);
  }
  to {
    -moz-transform: rotate(360deg);
  }
}

@-webkit-keyframes formio-spin {
  from {
    -webkit-transform: rotate(0deg);
  }
  to {
    -webkit-transform: rotate(360deg);
  }
}

@keyframes formio-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.button-icon-right {
  margin-left: 5px;
}

.formio-component-submit .submit-success::after {
  content: '\2713';
  position: relative;
  right: -4px;
  top: 1px;
  line-height: 1;
}

.formio-component-submit .submit-fail::after {
  content: '\2717';
  position: relative;
  right: -4px;
  top: 1px;
  line-height: 1;
}

.card.card-vertical {
  display: flex;
  flex-direction: row;
  margin-top: 5px;
}

.card.card-vertical .card-body,
.tab-content,
.tab {
  flex-grow: 2;
}

.nav-tabs-vertical {
  display: flex;
  flex-direction: column;
  border-right: 1px solid #ddd;
  padding-left: 5px;
  margin-right: 10px;
  border-bottom: 0;
}

.card.card-vertical > .card-body,
.card.card-vertical > .tab-content,
.card.card-vertical > .tab {
  flex-basis: 85%;
}

.card.card-vertical ul>li>.nav-link-vertical  {
  border-right-color: transparent;
  border-radius: 4px 0 0 4px;
  margin-right: 0;

  &.active {
    border-bottom-color: #ddd;
    border-right-color: transparent;

    &:hover {
      border-right-color: transparent;
    }
  }
}

.nav-tabs-vertical>li {
  margin: 0 -1px 0 0;
}

.formio-component-submit .submit-fail[disabled] {
  opacity: 1;
}

.form-control.flatpickr-input {
  background-color: #fff;
}

.input-group .flatpickr-wrapper {
  flex-grow: 1;
}

.flatpickr-calendar {
  .flatpickr-current-month .flatpickr-monthDropdown-months:focus,
  .flatpickr-current-month input.cur-year:focus,
  .flatpickr-days:focus {
    outline: auto;
  }
}

td > .form-group,
td > .formio-form-group {
  margin-bottom: 0;
}

.signature-pad-body {
  overflow: hidden;
  position: relative;

  .form-control-feedback {
    position: absolute;
    font-size: 0.8rem;
    top: 1px;
    right: 3px;
  }
}

.signature-pad-canvas {
  border-radius: 4px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.02) inset;
  border: 1px solid #f4f4f4;
}

.btn.signature-pad-refresh {
  position:absolute;
  left: 0;
  top: 0;
  z-index: 1000;
  padding: 3px;
  line-height: 0;
}

[dir="rtl"] .btn.signature-pad-refresh {
  left: unset;
  right: 0;
}

.formio-component-multiple .choices__input {
  width: 100%;
}

.formio-component-multiple .is-invalid {
  border-color: #F04124;
}

.formio-component-multiple :not(.is-invalid) {
  border-color: #ccc;
}

.choices__list--dropdown .choices__item--selectable{
  padding-right: 0px;
}

.signature-pad-refresh img {
  height: 1.2em;
}

.signature-pad-footer {
  text-align: center;
  color: #C3C3C3;
}

.is-active.choices__list--dropdown {
  z-index: 100;
}

.choices__list--multiple .choices__item {
  border-radius: 0;
  padding: 2px 8px;
  line-height: 1em;
  margin-bottom: 6px;
}

.choices__list--single {
  padding: 0;
}

.choices__item.choices__item--selectable {
  white-space: nowrap;
  overflow: hidden;
  padding-right: 25px;
  text-overflow: ellipsis;
}

.choices__input {
  padding: 2px;
}

/* fix for choices.js .choices__input container in rtl */
.choices[dir="rtl"] > * {
  text-align: right;
}
/* end fix for choices.js .choices__input container in rtl */

/* fix for choices.js deletable items in rtl */
.choices[dir="rtl"] .choices__list--multiple .choices__item[data-deletable] {
  padding-left: 5px;
  float: right;
}

.choices[dir="rtl"] .choices__list--multiple .choices__item[data-deletable] .choices__button {
  float: left;
  margin: 0 8px 0 -4px;
  padding-left: unset;
  padding-right: 16px;
  border-left: unset;
  border-right: 1px solid #008fa1;
  overflow: hidden;
}
/* end fix for choices.js deletable items in rtl */

@-moz-document url-prefix() {
  .choices__button {
    float: right;
  }
}

.formio-component-file .fileSelector {
  position: relative;
  padding: 15px;
  border: 2px dashed #ddd;
  text-align: center;

  .loader-wrapper {
    display: none;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.1);

    .loader {
      height: 45px;
      width: 45px;
      margin-top: -23px;
      margin-left: -23px;
    }
  }

  a {
    text-decoration: underline;
  }
}

.formio-component-file .status {
  margin-top: 4px;
  font-size: 0.9rem;
}

.formio-component-file .list-group-item .fa {
  cursor: pointer;
}

.formio-component-file .fileSelector.fileDragOver {
  border-color: #127abe;
}

.formio-component-file .fileSelector .glyphicon, .formio-component-file .fileSelector .fa {
  font-size: 20px;
  margin-right: 5px;
}

[dir="rtl"] .formio-component-file .fileSelector .fa, [dir="rtl"] .formio-component-file .fileSelector .glyphicon {
  margin-right: unset;
  margin-left: 5px;
}

.formio-component-file .fileSelector .browse {
  cursor: pointer;
}

@-webkit-keyframes formio-dialog-fadeout {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@keyframes formio-dialog-fadeout {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@-webkit-keyframes formio-dialog-fadein {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes formio-dialog-fadein {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.formio-dialog {
  box-sizing: border-box;
  font-size: 0.8em;
  color: #666;

  &.formio-modaledit-dialog {
    font-size: inherit;
  }
}

.formio-dialog *,
.formio-dialog *:before,
.formio-dialog *:after {
  box-sizing: inherit;
}

.formio-dialog {
  position: fixed;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  z-index: $dialog-z-index;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  /* fix for Scrollbars not clickable on overflow #552 */
  background: rgba(0, 0, 0, 0.4);
  animation: formio-dialog-fadein 0.5s;
  /* end fix for Scrollbars not clickable on overflow #552 */
}

.formio-dialog.formio-dialog-disabled-animation,
.formio-dialog.formio-dialog-disabled-animation .formio-dialog-overlay,
.formio-dialog.formio-dialog-disabled-animation .formio-dialog-content {
  -webkit-animation: none!important;
  animation: none!important;
}

.formio-dialog-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  -webkit-backface-visibility: hidden;
  -webkit-animation: formio-dialog-fadein 0.5s;
  animation: formio-dialog-fadein 0.5s;
  /* fix for Scrollbars not clickable on overflow #552 */
  margin-right: 15px;
  background: transparent;
  /* end fix for Scrollbars not clickable on overflow #552 */
}

.formio-dialog-no-overlay {
  pointer-events: none;
}

.formio-dialog.formio-dialog-closing .formio-dialog-overlay {
  -webkit-backface-visibility: hidden;
  -webkit-animation: formio-dialog-fadeout 0.5s;
  animation: formio-dialog-fadeout 0.5s;
}

.formio-dialog-content {
  background: white;
  -webkit-backface-visibility: hidden;
  -webkit-animation: formio-dialog-fadein 0.5s;
  animation: formio-dialog-fadein 0.5s;
  pointer-events: all;
  overflow: auto;
}

.formio-component-modal-wrapper-select {
  .formio-dialog-content {
    overflow: initial;
  }
}

.formio-dialog.formio-dialog-closing .formio-dialog-content {
  -webkit-backface-visibility: hidden;
  -webkit-animation: formio-dialog-fadeout 0.5s;
  animation: formio-dialog-fadeout 0.5s;
}

.formio-dialog-close:before {
  font-family: 'Helvetica', Arial, sans-serif;
  content: '×';
  cursor: pointer;
}

html.formio-dialog-open,
body.formio-dialog-open {
  overflow: hidden;
}

.formio-dialog .tab-content {
  padding-top: 12px;
}

.formio-dialog-close {
  z-index: 1000;
}

@-webkit-keyframes formio-dialog-flyin {
  0% {
    opacity: 0;
    -webkit-transform: translateY(-40px);
    transform: translateY(-40px);
  }

  100% {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}

@keyframes formio-dialog-flyin {
  0% {
    opacity: 0;
    -webkit-transform: translateY(-40px);
    transform: translateY(-40px);
  }

  100% {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}

@-webkit-keyframes formio-dialog-flyout {
  0% {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }

  100% {
    opacity: 0;
    -webkit-transform: translateY(-40px);
    transform: translateY(-40px);
  }
}

@keyframes formio-dialog-flyout {
  0% {
    opacity: 1;
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }

  100% {
    opacity: 0;
    -webkit-transform: translateY(-40px);
    transform: translateY(-40px);
  }
}

.formio-dialog.formio-dialog-theme-default {
  padding-bottom: 160px;
  padding-top: 160px;

  .component-edit-container {
    padding: 0.5em;
  }
}

.formio-dialog.formio-dialog-theme-default.formio-dialog-closing .formio-dialog-content {
  -webkit-animation: formio-dialog-flyout .5s;
  animation: formio-dialog-flyout .5s;
}

.formio-dialog.formio-dialog-theme-default .formio-dialog-content {
  -webkit-animation: formio-dialog-flyin .5s;
  animation: formio-dialog-flyin .5s;
  background: #f0f0f0;
  border-radius: 5px;
  font-family: 'Helvetica',sans-serif;
  font-size: 1.1em;
  line-height: 1.5em;
  margin: 0 auto;
  max-width: 100%;
  padding: 1em;
  position: relative;
  width: 80%;
}

.formio-dialog.formio-dialog-theme-default .formio-dialog-close {
  border: none;
  background: transparent;
  cursor: pointer;
  position: absolute;
  right: 1px;
  top: 1px;
  z-index: 100;
}

.formio-clickable {
  cursor: pointer;
}

.component-settings .nav>li>a {
  padding: 8px 10px;
}

.formio-dialog.formio-dialog-theme-default .formio-dialog-close:before {
  display: block;
  padding: 3px;
  background: transparent;
  color: #8a8a8a;
  content: '×';
  font-size: 26px;
  font-weight: 400;
  line-height: 26px;
  text-align: center;
}

.formio-dialog.formio-dialog-theme-default .formio-dialog-close:hover:before,
.formio-dialog.formio-dialog-theme-default .formio-dialog-close:active:before {
  color: #777;
}

.formio-dialog.formio-dialog-theme-default .formio-dialog-message {
  margin-bottom: .5em;
}

.formio-dialog.formio-dialog-theme-default .formio-dialog-input {
  margin-bottom: 1em;
}

.formio-dialog.formio-dialog-theme-default .formio-dialog-input textarea,
.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type="text"],
.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type="password"],
.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type="email"],
.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type="url"] {
  background: #fff;
  border: 0;
  border-radius: 3px;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  margin: 0 0 .25em;
  min-height: 2.5em;
  padding: .25em .67em;
  width: 100%;
}

.formio-dialog.formio-dialog-theme-default .formio-dialog-input textarea:focus,
.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type="text"]:focus,
.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type="password"]:focus,
.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type="email"]:focus,
.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type="url"]:focus {
  box-shadow: inset 0 0 0 2px #8dbdf1;
  outline: none;
}

.formio-dialog-buttons {
  display: flex;
  justify-content: flex-end;
}

.formio-dialog.formio-dialog-theme-default .formio-dialog-buttons:after {
  content: '';
  display: table;
  clear: both;
}

.formio-dialog.formio-dialog-theme-default .formio-dialog-button {
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  float: right;
  font-family: inherit;
  font-size: .8em;
  letter-spacing: .1em;
  line-height: 1em;
  margin: 0 0 0 .5em;
  padding: .75em 2em;
  text-transform: uppercase;
}

.formio-dialog.formio-dialog-theme-default .formio-dialog-button:focus {
  -webkit-animation: formio-dialog-pulse 1.1s infinite;
  animation: formio-dialog-pulse 1.1s infinite;
  outline: none;
}

@media (max-width: 568px) {
  .formio-dialog.formio-dialog-theme-default .formio-dialog-button:focus {
    -webkit-animation: none;
    animation: none;
  }
}

.formio-dialog.formio-dialog-theme-default .formio-dialog-button.formio-dialog-button-primary {
  background: #3288e6;
  color: #fff;
}

.formio-dialog.formio-dialog-theme-default .formio-dialog-button.formio-dialog-button-secondary {
  background: #e0e0e0;
  color: #777;
}

.formio-dialog-content .panel {
  margin: 0;
}

.formio-dialog-content [ref="dialogHeader"] {
  padding-right: 15px;
}

.formio-placeholder {
  position:absolute;
  color: #999;
}

.formio-dialog .formio-dialog-close {
  cursor: pointer;
}

.formio-iframe {
  border: none;
  width: 100%;
  height: 1000px;
}

.inline-form-button {
  margin-right: 10px;
}

.tooltip {
  opacity: 1;
}

.tooltip[x-placement="right"] .tooltip-arrow {
  border-right: 5px solid black;
}

.tooltip[x-placement="right"] .tooltip-inner {
  margin-left: 8px;
}

.control-label--bottom {
  margin-bottom: 0;
  margin-top: 5px;
}

.formio-component-label-hidden {
  position: relative;
}

.formio-hidden {
  margin: 0;
}

.formio-removed {
  display: none;
}

.control-label--hidden {
  position: absolute;
  top: 6px;
  right: 5px;
}

.formio-component-datetime .control-label--hidden.field-required {
  right: 45px;
  z-index: 3;
}

.formio-component-survey .control-label--hidden.field-required,
.formio-component-selectboxes .control-label--hidden.field-required {
  top: 0;
}

.formio-component-resource .control-label--hidden.field-required,
.formio-component-select .control-label--hidden.field-required {
  right: 40px;
  z-index: 2;
}

.formio-component-radio .control-label--hidden.field-required:after,
.formio-component-selectboxes .control-label--hidden.field-required:after {
  display: none;
}

.formio-component-radio.formio-component-label-hidden.required .form-check-label:before,
.formio-component-selectboxes.formio-component-label-hidden.required .form-check-label:before {
  position: relative;
  content: "* ";
  color:#EB0000;
}

.formio-component-radio.formio-component-label-hidden.required .form-check .label-position-right.form-check-label:before,
.formio-component-selectboxes.formio-component-label-hidden.required .form-check .label-position-right.form-check-label:before {
  right: 20px;
}

/* Fix for Hidden checkbox in component editform. */
.formio-component-hidden:not(.formio-component-checkbox),
.formio-component-datasource {
  margin-bottom: 0;
}

.checkbox-inline label,
.radio-inline label {
  font-weight: 400;
  cursor: pointer;
}

.editgrid-listgroup {
  margin-bottom: 10px;
  overflow-wrap: break-word;
}

.formio-component-submit button[disabled]+.has-error {
  display: block;
}

.formio-choices.form-group,
.formio-choices.formio-form-group {
  margin-bottom: 0;
}

.formio-choices[data-type=select-multiple] .form-control {
  height: auto;
}

.form-control.formio-multiple-mask-select {
  width: 15%;
  z-index: 4;
}

.form-control.formio-multiple-mask-input {
  width: 85%;
}

.input-group.formio-multiple-mask-container {
  width: 100%;
}

.formio-component .table {
  margin-bottom: 0;
  word-break: break-word;
}

.formio-component-htmlelement {
  word-wrap: break-word;

  ol, ul {
    margin-left: 10px;

  }
}

.editgrid-table-container {
  margin-bottom: 10px;
  max-width: calc(100vw - 140px);

  .table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.editgrid-table-column {
  border: none;
}

.editgrid-table-head {
  border: 1px solid #ddd;
}

.editgrid-table-body {
  border: 1px solid #ddd;
  border-top: 0;
}

.formio-hide-label-panel-tooltip {
  margin-top: -10px;
  margin-left: -10px;
}

.is-disabled .choices__list--multiple .choices__item {
  padding: 5px 10px;
}

.is-disabled .choices__list--multiple .choices__item .choices__button {
  display: none;
}

.formio-collapse-icon {
  cursor: pointer;
  margin-right: 4px;
}

[dir="rtl"] .formio-collapse-icon {
  margin-right: unset;
  margin-left: 4px;
}

.formio-component-datetime .form-control[type="datetime-local"] ~ .input-group-addon,
.formio-component-dateTime .form-control[type="datetime-local"] ~ .input-group-addon {
  width: auto;
}

.formio-component-datagrid .formio-datagrid-remove {
  position: absolute;
  top: 0;
  right: 0;
  visibility: hidden;
  opacity: 0;
  transition: opacity 200ms linear, visibility 0ms 200ms;
}

.formio-component-datagrid {
  overflow-x: auto;
  overflow-y: visible;
  height: auto;

  .datagrid-table {
    &, td, th {
      border: 3px solid #ddd !important;
      padding: 10px;
    }

    &>tbody>tr>td:last-child {
      position: relative;
    }

    &>tbody>tr:hover>td:last-child .formio-datagrid-remove {
      visibility: visible;
      opacity: 1;
      transition: visibility 0ms, opacity 200ms linear;
    }
  }

  // .edittable-group-label {
  //   background-color: #ddd;
  // }
}

.datagrid-table {
  &>tbody>tr>td {
    word-break: auto-phrase;
  }
}

.formio-component-modaledit {
  .formio-modaledit-view-container {
    position: relative;
    border: 1px solid #ddd;
    min-height: 34px;
    padding: 6px 12px;
    cursor: text;

    td & {
      padding: 0;
      border-style: none;
    }
  }

  .formio-modaledit-edit {
    position: absolute;
    top: 0;
    left: 0;
    visibility: hidden;
    opacity: 0;
    transition: opacity 200ms linear, visibility 0ms 200ms;
  }

  .formio-modaledit-view-container:hover .formio-modaledit-edit {
    visibility: visible;
    opacity: 1;
    transition: visibility 0ms, opacity 200ms linear;
  }
}

.formio-modaledit-dialog {
  .formio-modaledit-close {
    position: absolute;
    top: 100%;
    right: 0;
    border-radius: 0;
  }
}

.reset-margins {
  html, body, div, span, applet, object, iframe,
  h1, h2, h3, h4, h5, h6, p, blockquote, pre,
  a, abbr, acronym, address, big, cite, code,
  del, dfn, em, img, ins, kbd, q, s, samp,
  small, strike, strong, sub, sup, tt, var,
  b, u, i, center,
  dl, dt, dd, ol, ul, li,
  fieldset, form, label, legend,
  table, caption, tbody, tfoot, thead, tr, th, td,
  article, aside, canvas, details, embed,
  figure, figcaption, footer, header, hgroup,
  menu, nav, output, ruby, section, summary,
  time, mark, audio, video {
	  margin: 0;
  }
}

.ck-body {
  .ck.ck-balloon-panel {
    z-index: 101000;
  }
}

.formio-component-select select[disabled="disabled"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  text-indent: 1px;
  text-overflow: '';
}

.formio-component-select div[disabled="disabled"] button,
.formio-component-select .choices.is-disabled[data-type*=select-one]:after {
  display: none;
}

.datagrid-group-label.collapsed > td {
  display: none;
}

.datagrid-group-header {
  &.clickable {
    cursor: pointer;

    .datagrid-group-label {
      &:before {
        display: inline-block;
        vertical-align: middle;
        content: '▾';
        margin: 0 5px;
      }
    }
  }

  &.clickable.collapsed {
    .datagrid-group-label {
      &:before {
        content: '▸';
      }
    }
  }
}

.formio-component.alert-danger .help-block,
.formio-component.alert-warning .help-block {
  color: inherit;
}

.formio-select-autocomplete-input {
  /* we can't use display: none or visibility: hidden because autocomplete won't work on hidden field */
  opacity: 0;
  position: relative;
  z-index: -1;
  display: block;
  height: 0;
  border: none;
  padding: 0;
}

.has-error > .help-block {
  margin-top: 5px;
  margin-bottom: 10px;
}

.no-top-border-table
  > .table
  > tbody
  > tr:first-child
  > td {
  border-top: none;
}

.table > tbody > tr > td.cell-align {
  &-left {
    text-align: left;
  }

  &-center {
    & > div {
      margin-left: auto;
      margin-right: auto;
    }

    text-align: center;
  }

  &-right {
    & > div {
      margin-left: auto;
    }

    text-align: right;
  }
}

.table-responsive[ref=component] {
  overflow-x: visible;
}

.formio-component-textarea {
  .alert .ck-editor__editable {
    color: inherit;
  }

  .ck.ck-editor__editable .image .ck-progress-bar {
    height: 4px;
  }

  .ck.ck-editor {
    ul, ol {
      margin-left: 10px;
    }
  }
}

div[data-oembed-url] {
  width: 100%;
}

.radio label.label-position-left, .checkbox label.label-position-left,
.radio label.label-position-top, .checkbox label.label-position-top,
.radio label.label-position-bottom, .checkbox label.label-position-bottom {
  padding-left: 0;
}

.radio label.label-position-top span, .checkbox label.label-position-top span,
.radio label.label-position-bottom span, .checkbox label.label-position-bottom span {
  display: block;
}

.radio label.label-position-top input[type="radio"], .checkbox label.label-position-top input[type="checkbox"],
.radio label.label-position-bottom input[type="radio"], .checkbox label.label-position-bottom input[type="checkbox"] {
  position: relative;
  margin-left: 0;
}

.radio label.label-position-top input[type="radio"], .checkbox label.label-position-top input[type="checkbox"] {
  margin-top: 4px;
}

.radio label.label-position-bottom input[type="radio"], .checkbox label.label-position-bottom input[type="checkbox"] {
  margin-bottom: 8px;
}

.radio label.label-position-left input[type="radio"] {
  margin-left: 10px;
}

.checkbox label.label-position-left input[type=checkbox] {
  margin-left: 4px;
  position: relative;
}

.open-modal-button {
  width: 100%;
  text-align: left;
  white-space: normal;
  height: auto;
}

.formio-component-modal-wrapper-signature .open-modal-button {
  text-align: center;
  height: 100%;
  font-size: 1.4em;
  padding: 0;
  margin: 0;
}

/* ckeditor5-image/theme/image.css */
.formio-component-content .image {
  display: table;
  clear: both;
  text-align: center;
  margin: 1em auto
}
/* ckeditor5-image/theme/image.css */
.formio-component-content .image > img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  min-width: 50px;
}
/* ckeditor5-image/theme/imagecaption.css */
.formio-component-content .image > figcaption {
  display: table-caption;
  caption-side: bottom;
  word-break: break-word;
  color: hsl(0, 0%, 20%);
  background-color: hsl(0, 0%, 97%);
  padding: .6em;
  font-size: .75em;
  outline-offset: -1px;
}
/* ckeditor5-image/theme/imageresize.css */
.formio-component-content .image.image_resized {
  max-width: 100%;
  display: block;
  box-sizing: border-box
}
/* ckeditor5-image/theme/imageresize.css */
.formio-component-content .image.image_resized img {
  width: 100%;
}
/* ckeditor5-image/theme/imageresize.css */
.formio-component-content .image.image_resized > figcaption {
  display: block;
}
/* ckeditor5-media-embed/theme/mediaembed.css */
.formio-component-content .media {
  clear: both;
  margin: 1em 0;
  display: block;
  min-width: 15em;
}
/* ckeditor5-image/theme/imagestyle.css */
.formio-component-content .image-style-side:not(.image_resized), .formio-component-content .image-style-align-left:not(.image_resized), .formio-component-content .image-style-align-center:not(.image_resized), .formio-component-content .image-style-align-right:not(.image_resized) {
  max-width: 50%;
}
/* ckeditor5-image/theme/imagestyle.css */
.formio-component-content .image-style-side:not(.image_resized), .formio-component-content .image-style-align-left:not(.image_resized), .formio-component-content .image-style-align-center:not(.image_resized), .formio-component-content .image-style-align-right:not(.image_resized) {
  max-width: 50%;
}
/* ckeditor5-image/theme/imagestyle.css */
.formio-component-content .image-style-side:not(.image_resized), .formio-component-content .image-style-align-left:not(.image_resized), .formio-component-content .image-style-align-center:not(.image_resized), .formio-component-content .image-style-align-right:not(.image_resized) {
  max-width: 50%;
}
/* ckeditor5-image/theme/imagestyle.css */
.formio-component-content .image-style-side:not(.image_resized), .formio-component-content .image-style-align-left:not(.image_resized), .formio-component-content .image-style-align-center:not(.image_resized), .formio-component-content .image-style-align-right:not(.image_resized) {
  max-width: 50%;
}
/* ckeditor5-image/theme/imagestyle.css */
.formio-component-content .image-style-side {
  float: right;
  margin-left: var(--ck-image-style-spacing);
}
/* ckeditor5-image/theme/imagestyle.css */
.formio-component-content .image-style-align-left {
  float: left;
  margin-right: var(--ck-image-style-spacing);
}
/* ckeditor5-image/theme/imagestyle.css */
.formio-component-content .image-style-align-center {
  margin-left: auto;
  margin-right: auto;
}
/* ckeditor5-image/theme/imagestyle.css */
.formio-component-content .image-style-align-right {
  float: right;
  margin-left: var(--ck-image-style-spacing);
}
/* ckeditor5-block-quote/theme/blockquote.css */
.formio-component-content blockquote {
  overflow: hidden;
  padding-right: 1.5em;
  padding-left: 1.5em;
  margin-left: 0;
  margin-right: 0;
  font-style: italic;
  border-left: solid 5px hsl(0, 0%, 80%);
}
/* ckeditor5-block-quote/theme/blockquote.css */
.formio-component-content[dir="rtl"] blockquote {
  border-left: 0;
  border-right: solid 5px hsl(0, 0%, 80%);
}

.formio-component-content {
  & .text-tiny {
    font-size: 0.7em;
  }

  & .text-small {
    font-size: 0.85em;
  }

  & .text-big {
    font-size: 1.4em;
  }

  & .text-huge {
    font-size: 1.8em;
  }

  ol {
    padding-inline-start: 40px;
  }
}

.formio-component-address.formio-component-label-hidden {
  & > label.field-required {
    z-index: 1;

    & ~ .address-autocomplete-container .address-autocomplete-remove-value-icon {
      right: 20px;
    }
  }
}

.address-autocomplete-container {
  position: relative;

  .address-autocomplete-remove-value-icon {
    cursor: pointer;
    position: absolute;
    margin-top: -9px;
    right: 10px;
    top: 50%;

    &--hidden {
      display: none;
    }
  }
}

.autocomplete {
  background: white;
  font: 14px/22px "-apple-system", BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow: auto;
  box-sizing: border-box;
  border: 1px solid rgba(50, 50, 50, 0.6);
  z-index: $autocomplete-in-dialog-z-index;
}

.autocomplete > div {
  cursor: pointer;
  padding: 6px 10px;
}

.autocomplete > div:hover:not(.group),
.autocomplete > div.selected {
  background: #1e90ff;
  color: #ffffff;
}

.field-wrapper {
  display: flex;

  &--reverse {
    flex-direction: row-reverse;
  }

  .field-label--right {
    text-align: right;
  }
}

.formio-component-modal-wrapper {
  margin-bottom: 10px;
  .open-modal-button {
    height: auto;
  }
  .component-rendering-hidden {
    visibility: hidden;
  }
}

//show textarea submission in read-only mode and PDF view with initial line and space formatting
.formio-component-textarea {
  div.formio-editor-read-only-content[ref="input"] {
    white-space: pre-wrap;
  }
}

.formio-editor-read-only-content {
  img {
    max-width: 100%;
  }

  li[data-list="bullet"] {
    list-style-type: none;

    .ql-ui{
      padding-right: 0.5rem;

      &::before {
        content: "\2022";
      }
    }
  }

  li[data-list="ordered"] {
    list-style-type: none;
    counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;
    counter-increment: list-0;

    .ql-ui {
      padding-right: 0.5rem;

      &::before {
        content: counter(list-0, decimal) '. ';
      }
    }
  }

  figure.table {
    table {
      border-collapse: collapse;
      border-spacing: 0;
      width: 100%;
      height: 100%;
      border: 1px double #b3b3b3;
      table-layout: fixed;

      th, td {
        min-width: 2em;
        padding: .4em;
        border: 1px solid #bfbfbf;
      }
    }
  }
}

.formio-component-textfield,
.formio-component-textarea,
.formio-component-password {
  .pull-right:not(:last-child) {
    padding-left: 12px;
  }
}

.formio-form > div > nav > ul.pagination {
  flex-flow: wrap row;
  justify-content: flex-start;

  .page-link {
    cursor: pointer;
    color: #1C74D9;
  }

  .page-item.active .page-link {
    color: #fff;
    background-color: #1C74D9;
    border-color: #1C74D9;
  }
}

.classic-pagination {
  border-bottom: solid 1px #e0e0e0;
  padding: 0 15px 10px 15px;
  line-height: 1em;

  &-page {
    padding: 0;
    position: relative;
  }

  &-title {
    color: #595959;
    font-size: 16px;
    margin-bottom: 5px;
  }

  &-dot {
    position: absolute;
    width: 30px;
    height: 30px;
    display: block;
    background: #fbe8aa;
    top: 40px;
    left: 50%;
    margin-top: -15px;
    margin-left: -15px;
    border-radius: 50%;

    &::after {
      content: ' ';
      width: 14px;
      height: 14px;
      background: #fbbd19;
      border-radius: 50px;
      position: absolute;
      top: 8px;
      left: 8px;
    }
  }

  .progress, &-progress {
    position: relative;
    border-radius: 0px;
    height: 8px;
    box-shadow: none;
    margin: 20px 0;
    border: none;
    padding: 0;
    background-color: #f6f6f6;

    &-bar {
      width: 0px;
      height: 10px;
      box-shadow: none;
      background: #fbe8aa;
    }
  }
}

.classic-pagination-page {
  &.complete {
    .progress-bar, .classic-pagination-progress-bar {
      width: 100%;
    }
  }
  &.active {
    .progress-bar, .classic-pagination-progress-bar {
      width: 50%;
    }
  }
  &.disabled {
    .classic-pagination-dot {
      background-color: #f5f5f5;
      &::after{
        opacity: 0;
      }
    }
  }
}

.classic-pagination-page  {
  &:first-child {
    .progress, .classic-pagination-progress {
      left: 50%;
      width: 50%;
    }

    &.active {
      .progress-bar, .classic-pagination-progress-bar {
        width: 0%;
      }
    }
  }

  &:last-child {
    .progress, .classic-pagination-progress {
      width: 50%;
    }

    &.active {
      .progress-bar, .classic-pagination-progress-bar {
        width: 100%;
      }
    }
  }
}
//styles for google maps dropdown
.pac-container {
  z-index: 11000;
}

[ref='buttonMessageContainer'].has-error {
  cursor: pointer;
}

[ref="passwordStrengthIndicator"] {
  display: inline;
}

.formio-security-indicator {
  display: flex;
  height: 5px;

  [class^="security-"] {
    width: 100%;
    height: 100%;
  }

  .security-low {
    background-color: #c51e00;
  }

  .security-medium {
    background-color: #ebb400;
  }

  .security-high {
    background-color: #bddf00;
  }

  .security-very-high {
    background-color: #009118;
  }
}

.formio-component-textarea {
  .formio-editor-read-only-content {
    .text-big {
      font-size: 1.4em;
    }

    .text-huge {
      font-size: 1.8em;
    }

    .text-small {
      font-size: 0.85em;
    }

    .text-tiny {
      font-size: 0.7em;
    }
  }
}

.formio-component [ref="valueMaskInput"] {
  display: none;
}

.formio-wizard-nav-container {
  display: flex;

  li {
    margin-right: 0.5rem;
  }

  @media not all and (min-width: 30em) {
    flex-direction: column;

    li {
      margin-right: 0;
    }

    li .btn {
      width: 100%;
      margin-bottom: 0.25rem;
    }
  }
}

//styles for accessible tooltip
.formio-tooltip__trigger {
  cursor: pointer;
}

.formio-tooltip__body {
  background-color: #1b1b1b;
  border-radius: 0.25rem;
  bottom: 0;
  color: #f0f0f0;
  display: none;
  font-size: 1rem;
  padding: 0.5rem;
  position: absolute;
  left: 0;
  transform: translateX(-50%);
  width: auto;
  white-space: pre;
  z-index: 1000;

  &.formio-tooltip--is-set {
    display: block;
  }

  &--whitespace {
    white-space: normal;
    width: 250px;
  }

  &--right {
    top: auto;
    transform: translateX(0);
  }

  &--left {
    top: auto;
    left: 0;
    right: auto;
    transform: translateX(0);
  }

  &--bottom {
    bottom: auto;
    top: 0;
  }
}

.formio-tooltip__wrapper {
  position: relative;
  & > span {
    font-weight: normal;
  }
}

.ace_editor, .ace_editor div, .ace_editor span {
  font-family: "Monaco", "Menlo", "Ubuntu Mono", "Droid Sans Mono", "Consolas", monospace !important;
}

span[role="link"] {
  text-decoration: underline;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.align-center {
  display: flex;
  align-items: center;
}

.justify-center {
  display: flex;
  justify-content: center;
}
